#!/bin/bash
dir1=`dirname $1`
name1=`basename $1`
echo ${dir1}
echo ${name1}
cd ${dir1}

name2=`echo $(echo $(pwd)/${name1}|md5sum -) |awk '{print $1}'`
name3=`echo ${name1} |awk -F. '{print $1}'`
xfttsgo -o /tmp/${name2}.wav $name1
rm -f ${name2}.mp3
ffmpeg -i /tmp/${name2}.wav -f mp3 -acodec libmp3lame -y ${name3}.mp3
rm /tmp/${name2}.wav
